import { createApp } from 'vue'
import './style.scss'
import App from './App.vue'
import router from './router'
import store from './store'
// ElementPlus组件库: 核心对象，核心CSS，显隐CSS
import ElementPlus from 'element-plus';
import 'element-plus/dist/index.css';
import 'element-plus/theme-chalk/display.css';
import * as ElementPlusIcons from '@element-plus/icons-vue';
// ElementPlus暗黑模式: 核心CSS
import 'element-plus/theme-chalk/dark/css-vars.css';
import zhCn from 'element-plus/es/locale/lang/zh-cn'

let app = createApp(App);
app.use(router);
app.use(store);
app.use(ElementPlus, {locale: zhCn});
app.mount('#app');

// 全局注册ElementPlus图标库
for (const [key, component] of Object.entries(ElementPlusIcons)) {
    app.component(key, component)
}